﻿// JScript 文件
var http;
function CreateActiveXobjectAdminLogin(name) {
    if (name != "") {
        http = new ActiveXObject("Microsoft.XMLHTTP");
        http.open("get", "../Manager/AddAdminRegisterMid.aspx?name=" + name);
       
        http.onreadystatechange = IsName;
        http.send();
    }
}
function CreateActiveXobjectUserLogin(name) {
    http = new ActiveXObject("Microsoft.XMLHTTP");
    http.open("get", "../Manager/AddUserRegisterMid.aspx?name=" + name);
    http.onreadystatechange = IsName;
    http.send();
}

function CreateActiveXobjectAddSchool(name) {
    if (name != "") {

        http = new ActiveXObject("Microsoft.XMLHTTP");
        http.open("get", "../Manager/AddSchoolCheck.aspx?name=" + name);
        http.onreadystatechange = IsName;
        http.send();
    }
}
function CreateActiveTrainClassNum(Num) {
    http = new ActiveXObject("Microsoft.XMLHTTP");
    http.open("get", "../Manager/AddTrainClass.aspx?VTC_Number=" + Num);
    http.onreadystatechange = IsName;
    http.send();
}
function IsName()
{
   if (http.readyState==4||http.readyState=="complete") {
       
       if (http.responseText=="False")
        {document.getElementById("lblname").innerText="此名字已占用，请换一个";}
        else
        {document.getElementById("lblname").innerText="此名字可用";}
   }


}
